package com.ls.pattern.behavior.observer;

public class Sina implements Observer {
    private float f1;
    private float f2;


    //更新天气
    public void update(float f1, float f2) {
        this.f1 = f1;
        this.f2 = f2;
        display();
    }

    //显示
    public void display() {
        System.out.println("-----------" + f1 + "-----------");
        System.out.println("+++++++++++" + f2 + "+++++++++++");
    }
}
